<template>
	<div class="add-wallet">
		<van-nav-bar title="添加钱包" left-arrow @click-left="onClickLeft" @click-right="onClickRight"></van-nav-bar>
		<div class="overlay headTop">
			<van-cell-group class="cell" :border="false">
				<van-cell title="ETH" class="cell align-items" @click="show = true">
					<div slot="icon">
						<img src="../../assets/images/assets4.png" width="29px" style="margin-right:10px;vertical-align: middle;" />
					</div>
					<van-icon name="arrow" size="19" style="vertical-align: middle;" />
				</van-cell>
			</van-cell-group>
		</div>
		<van-action-sheet v-model="show" :actions="actions" @select="onSelect" cancel-text="取消" />
	</div>
</template>

<script>
	export default {
		data() {
			return {
				show: false,
				actions: [{
						name: "创建"
					},
					{
						name: "导入"
					}
				]
			};
		},
		components: {},
		methods: {
			onClickLeft() {
				this.$router.go(-1);
			},
			onSelect(item) {
				console.log(item.name);
				if(item.name === "创建") {
					this.$router.push({
						path: "/Found"
					});
				} else {
					this.$router.push({
						path: "/import"
					});

				}
			}
		}
	};
</script>

<style lang="scss" scoped>
	.overlay {
		background: #f2f4f5 !important;
	}
	
	.headTop {
		top: 46px;
	}
	
	.cell {
		padding: 8px 5px 8px 14px;
	}
	
	.van-popup--bottom.van-popup--round {
		border-radius: 0;
		padding: 10px 10px 12px 10px;
		box-sizing: border-box;
		background-color: #f2f4f5;
	}
	
	.van-action-sheet__item:nth-child(1) {
		border-radius: 15px 15px 0px 0px;
	}
	
	.van-action-sheet__item:nth-child(2) {
		border-radius: 0px 0px 15px 15px;
	}
	
	.van-action-sheet__cancel {
		border-radius: 25px 25px 15px 15px;
	}
	
	.van-action-sheet__item:not(:last-child) {
		color: #007be2;
	}
</style>